package com.google.gwt.sample.dynatablerf.server;

import com.google.gwt.sample.dynatablerf.server.business.ControladorFactory;
import com.google.gwt.sample.dynatablerf.server.domain.ServicoProjeto;
import com.google.web.bindery.requestfactory.shared.Locator;

public class ServicoProjetoLocator extends Locator<ServicoProjeto, Long> {

	@Override
	public ServicoProjeto create(Class<? extends ServicoProjeto> clazz) {
		return new ServicoProjeto();
	}

	@Override
	public ServicoProjeto find(Class<? extends ServicoProjeto> clazz, Long id) {
		return ControladorFactory.getControladorServicoProjeto().findById(id);
	}

	@Override
	public Class<ServicoProjeto> getDomainType() {
		return ServicoProjeto.class;
	}

	@Override
	public Long getId(ServicoProjeto domainObject) {
		return domainObject.getId();
	}

	@Override
	public Class<Long> getIdType() {
		return Long.class;
	}

	@Override
	public Object getVersion(ServicoProjeto domainObject) {
		return domainObject.getVersion();
	}

}
